const request = require('request')
const iconv = require('iconv-lite')

const sendRequest = (opt, cb) => {
  const obj = Object.assign({
    url: '',
    method: 'GET',
    encoding: null
  }, opt);
  // console.log(obj)
	request(obj, (err, res, body) => {
		const buf = iconv.decode(body, 'utf-8').toString()
		cb(body)
	})
}
exports.sendRequest = sendRequest
